home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cool / ge_cool.lha / GE_COOL2.1 / src / Tree / NT_State.C < prev    next >
C/C++ Source or Header  |  1992-05-15  |  1KB  |  37 lines

  1. //
  2. // Copyright (C) 1991 Texas Instruments Incorporated.
  3. //
  4. // Permission is granted to any individual or institution to use, copy, modify,
  5. // and distribute this software, provided that this complete copyright and
  6. // permission notice is maintained, intact, in all copies and supporting
  7. // documentation.
  8. //
  9. // Texas Instruments Incorporated provides this software "as is" without
  10. // express or implied warranty.
  11. //
  12. // Updated: VDN 02/21/92 -- Separate NT_State which must be implemented once
  13. //
  14.  
  15. #include <cool/NT_State.h>
  16.  
  17. #include <cool/Pair.C>
  18. #include <cool/Stack.C>
  19.  
  20. IMPLEMENT CoolPair<long,int>;            // Implement these only once.
  21. IMPLEMENT CoolStack<CoolPair<long,int>>;
  22.   
  23. // NT_State() -- Copy constructor
  24.  
  25. CoolNT_State::CoolNT_State (const CoolNT_State& s) {    
  26.   this->stack = s.stack;            
  27.   this->forward = s.forward;
  28. }
  29.  
  30. // operator = -- Overload assignment operator
  31.  
  32. CoolNT_State& CoolNT_State::operator= (const CoolNT_State& s) { 
  33.   this->stack = s.stack;            // Needs memberwise copy
  34.   this->forward = s.forward;
  35.   return *this;
  36. }
  37.